#ifndef __IGU_EXTRUSION__
#define __IGU_EXTRUSION__

#include <iostream>

#include "Vec3.h"
#include "Vec2.h"

class Figure;
class Trajectory;

class extrusion
{
public:
	// Constructor (initializes the extrusion)
	extrusion();

	// Renders the extrusion with OpenGL
	void renderextrusion();
	

	
	// Save the extrusion. 
	void save( std::ostream& output);

	int Convex();

	// Loads the extrusion. 
	void load(Figure *fig, Trajectory* traj);

	int checkClockWise();
	int invertClockWise();

	
private:
	
	VectorVec2 shape;
	VectorVec2 trajectory;

	VectorVec2 auxiliar;
	int numShape;//number of vertices in the shape
	int numTraj;//number of points in the trajectory

	bool CCW;

	GLfloat *vertexes;
	GLuint *indexes;
	int indSize;



	//Vec2 auxiliar;

	float red;
	float green;
	float blue;

	
};


#endif

